import Vue from 'vue'
import Router from 'vue-router'

import Rank from '../components/rank/rank.vue'
import Recommend from '../components/recommend/recommend.vue'
import Search from '../components/search/search.vue'

import Singer from '../components/singer/singer.vue'
import singerInfo from '../components/singer/singerinfo.vue'
import singerSongsList from '../components/singer/singersongslist.vue'

import rankInfo from '../components/rank/rankinfo.vue'
import user from '../components/user/user.vue'

Vue.use(Router)

var router = new Router({
  routes: [
    {path: '/', redirect: '/recommend'},
    {path: '/rank', component: Rank},
    {path: '/recommend', component: Recommend},
    {path: '/search', component: Search},

    {path: '/singer', component: Singer},
    {path: '/singer/:id', component: singerInfo},
    {path: '/singer/singerinfo/:id', component: singerSongsList},

    {path: '/rank/:id', component: rankInfo},
    {path: '/user', component: user}

  ]
})
export default router
